﻿/* 分页类 by match on 20110425 */
$(function () {
    (function () { // 分页跳转
        var pager = function () {
            var iv = $("div.shopb2c_core_pager_1 input.i").val();
            var hv = $("div.shopb2c_core_pager_1 :hidden").val();
            window.location.assign(hv.replace(/-p-/ig, iv == "" ? 1 : iv));
        };
        $("div.shopb2c_core_pager_1 :button").click(pager);
        $("div.shopb2c_core_pager_1 input.i").keypress(function (e) {
            if (e.which == 13) { pager(); }
            else { return e.which >= 48 && e.which <= 57; }
        });
    })();
});